<script>
  // a class representing a dependency
  // exposing it on window is necessary for testing
  window.Dep = class Dep {
    // Implement this!
  }

  function autorun(update) {
    // Implement this!
  }
</script>